/*
 * view.c
 * usefull functions needed by almost all class in view directory
 *
 *  Created on: 21-dic-2008
 *      Author: igor
 */

#include "view.h"

void
my_win_del(void *data, Evas_Object *obj, void *event_info)
{
   /* called when my_win_main is requested to be deleted */
   elm_exit(); /* exit the program's main loop that runs in elm_run() */
}

/*
 * closes a win
 */
void
my_win_close(void *data, Evas_Object *obj, void *event_info)
{
   /* chiude la finestra */
   evas_object_del(data);
}

/* refresh della finestra principale
 *
 * refresh main win by deleting and recreating that
 */
void
my_entry_bt_refresh(void *data, Evas_Object *obj, void *event_info)
{
   printf("DEBUG: refresh not yet implemented;\n");
   evas_object_del(data);
   my_win_main();
}

/* assign a layout (ly) named (key) to an object */
void
window_swallow(Evas_Object *ly, const char *key, Evas_Object *object)
{
   if (ly != NULL)
	   edje_object_part_swallow(elm_layout_edje_get(ly), key, object);
}

